package pay.biz;

/**
 * @author suan
 */
public enum PayNotifyTypeEnum {

    APAY_TRADE_STATUS_SYNC("trade_status_sync", "交易状态同步"),

    WXPAY_TRADE_STATUS_SYNC("wx_trade_status_sync", "交易状态同步"),

    ;

    /** 业务分类名称 */
    private String code;

    /** 业务分类描述 */
    private String description;

    /**
     * 构造函数
     * 
     * @param code
     * @param description
     */
    private PayNotifyTypeEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public static PayNotifyTypeEnum getEnumByCode(String code) {

        for (PayNotifyTypeEnum tmpEnum : PayNotifyTypeEnum.values()) {
            if (tmpEnum.getCode().equalsIgnoreCase(code)) {
                return tmpEnum;
            }
        }

        return null;
    }

    /**
     * @return the code - {返回值描述信息}.
     */
    public String getCode() {
        return code;
    }

    /**
     * @param code
     *            to set - {参数含义描述}.
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description
     *            the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }
}
